<template>
    <el-collapse v-model="activeNames">
        <el-collapse-item :name="item.id" v-for="item, index in adminMenuList" :key="index">
            <template slot="title">
                <span>{{ item.title }}</span>
            </template>
            <AdminMenuItem :adminMenuInfo="item.adminMenuTrees"></AdminMenuItem>
            <div class="collapseItemBottom">
                <el-button type="primary" size="small">查看菜单</el-button>
                <el-button type="warning" size="small">编辑菜单</el-button>
                <el-button type="danger" size="small">删除菜单</el-button>
            </div>
        </el-collapse-item>
    </el-collapse>
</template>

<script>
import AdminMenuItem from '@/pages/MainContent/AdminMenu/AdminMenuItem'
export default {
    name: 'MyCollapse',
    props: ["adminMenuList"],
    components: {
        AdminMenuItem
    },
    data() {
        return {
            // 选中的菜单
            activeNames: [],
            // 当前选中的菜单
        }
    },
    methods: {
    
    }
}
</script>

<style scoped>
.collapseItemBottom {
    margin-top: 10px;
    text-align: right;
}
</style>